package main

import (
	"log"

	"github.com/qiniu/api.v7/auth/qbox"
	"github.com/qiniu/api.v7/storage"
)

var (
	AK = "V_NFErwixCiC-PBkfAQhFLm44oW6v7XIDUYLLEfu"
	SK = "W1uIofGmr7kM4yWC9jRDaqtOFuPPpvfp9lnUabBY"
)

func init() {
	log.SetFlags(log.LstdFlags | log.Lshortfile)
}
func main() {
	mac := qbox.NewMac(AK, SK)

	bucket := "markets"
	putPolicy := storage.PutPolicy{
		Scope: bucket,
	}
	upToken := putPolicy.UploadToken(mac)
	log.Println("upToken", upToken)
}
